public class Test06 {
    public String modifyString(String s) {
        char[] arr = s.toCharArray();
        for(int i = 0 ; i < arr.length ; i++){
            if(arr[i] == '?'){
                for(char a = 'a' ; a < 'z' ; a++){
                    if((i == 0 || a != arr[i - 1]) &&( i == arr.length - 1 || a != arr[i+1])){
                        arr[i] = a;
                        break;
                    }
                }
            }
        }
        return String.valueOf(arr);
    }
}
